using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class PauseDialog : IUIBehavior
{

    public override void AddListener()
    {
        GetUIElement<Button>("btnContinue").onClick.AddListener(OnContinueClicked);
        GetUIElement<Button>("btnQuit").onClick.AddListener(OnQuitClicked);
    }

    public override void Init()
    {

    }

    public override void RemoveListener()
    {
        GetUIElement<Button>("btnContinue").onClick.RemoveListener(OnContinueClicked);
        GetUIElement<Button>("btnQuit").onClick.RemoveListener(OnQuitClicked);
    }

    private void OnContinueClicked()
    {
        Hide();
        PanelManager.Instance.HideDialog(typeof(PauseDialog).Name);
    }

    private void OnQuitClicked()
    {
        Application.Quit();
    }
}
